//
//  BasicTableViewController.swift
//  SinaWebo
//
//  Created by apple on 16/6/7.
//  Copyright © 2016年 apple. All rights reserved.
//

import UIKit

class BasicTableViewController: UITableViewController ,buttonAction{

    var isLogin = false
    var vister: VisterView?
    
    override func loadView() {
        if isLogin  {
            super.loadView()
        }else {
            let loginView = VisterView()
            loginView.delegate = self
            loginView.backgroundColor = UIColor.whiteColor()
            vister = loginView
            view = vister
        }
    }

    override func viewDidLoad() {
        super.viewDidLoad()
        
    }
    func userWillLgoin() {
        let oauthView = OAuthViewController()
        let nav = UINavigationController(rootViewController: oauthView)
        
        presentViewController(nav, animated: true) { () -> Void in print(__FUNCTION__)}
        
    }
    
    func userWillRegister() {
        
        
    }
 }
